package com.woniu.HisHospitalizationApi;


import com.woniu.dto.HisNursingDto;
import com.woniu.dto.PageDTO;
import com.woniu.param.HisNursingAddParam;
import com.woniu.param.HisNursingParam;
import com.woniu.util.Result;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.ArrayList;
import java.util.List;

@FeignClient(
        value = "his-hospitalization",
        contextId = "HisNursing")
@Api(tags = "住院的护理记录接口")
public interface HisNursingApi {
    //-------------------关于护理记录操作-------------------
    //查询所有护理记录
    @ApiOperation("查询所有护理记录")
//    @ApiImplicitParams({
//            @ApiImplicitParam(name = "无",
//                    value = "无",
//                    required = false,
//                    dataType = "无")
//    })
    @GetMapping("getAllHisNursing")
    public Result<PageDTO<HisNursingDto>> getAllHisNursing();

    //新增护理记录
    @ApiOperation("新增护理记录")
//    @ApiImplicitParams({
//            @ApiImplicitParam(name = "hisNursingAddParam",
//                    value = "护理记录对象",
//                    required = false,
//                    dataType = "HisNursingAddParam")
//    })
    @PostMapping("addHisNursing")
    public Result<HisNursingDto> addHisNursing(@RequestBody HisNursingAddParam hisNursingAddParam);

    //删除护理记录
    @ApiOperation("新增护理记录根据id")
//    @ApiImplicitParams({
//            @ApiImplicitParam(name = "id",
//                    value = "护理记录id",
//                    required = false,
//                    dataType = "ArrayList<Integer>")
//    })
    @DeleteMapping("deleteHisNursingById")
    public Result<Boolean> deleteHisNursingById(@RequestParam("id") ArrayList<Integer> id);

    //修改护理记录
    @ApiOperation("修改护理记录")
//    @ApiImplicitParams({
//            @ApiImplicitParam(name = "hisNursingParan",
//                    value = "护理记录对象",
//                    required = false,
//                    dataType = "hisNursingParan")
//    })
    @PutMapping("updateHisNursing")
    public Result<HisNursingDto> updateHisNursing(@RequestBody HisNursingParam hisNursingParan);

    //查询护理记录
    @ApiOperation("查询护理记录")
//    @ApiImplicitParams({
//            @ApiImplicitParam(name = "id",
//                    value = "查询的参数",
//                    required = false,
//                    dataType = "arraylist")
//    })
    @PostMapping("getHisNursingBy")
    public Result<PageDTO<HisNursingDto>> getHisNursingBy(@RequestBody HisNursingParam hisNursingParam);

}
